package com.zero.account.api;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @author zero
 * @ClassName AccountServiceApi
 * @Description
 * @Date 2025/5/15 13:37
 */
@FeignClient(name = "account-service",path = "account")
public interface AccountServiceApi {
    /**
     * 退款
     * @param userId
     * @param money
     */
    @PostMapping("deduct/{userId}/{money}")
     void deduct(@PathVariable("userId") String userId, @PathVariable( "money") int money) ;
    @PostMapping("refund/{userId}/{money}")
     void refund(@PathVariable("userId") String userId, @PathVariable( "money") int money) ;
    /**
     *  测试负载均衡
     */
    @GetMapping("loadBalance")
     String loadBalance();
}
